package com.simpleplugin;

import com.intellij.lang.Language;
import com.intellij.openapi.fileTypes.LanguageFileType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * 定义一个文件类型
 * zhenjun.xu
 * 2016/12/28
 */
public class SimpleFileType extends LanguageFileType{

    public static final SimpleFileType INSTANCE = new SimpleFileType();

    protected SimpleFileType() {
        super(SimpleLanguage.INSTANCE);
    }

    @Nullable
    @Override
    public Icon getIcon() {
        return SimpleIcons.FILE;
    }

    @NotNull
    @Override
    public String getDescription() {
        return "Simple language file";
    }

    @NotNull
    @Override
    public String getName(){
        return "simple file";
    }

    @NotNull
    @Override
    public String getDefaultExtension() {
        return "simple";
    }

}
